program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  a, b, c, i, k : integer;
begin
  Read (a, b, c);
  Readln;
  if (a>c) and (b>c) then
    k:=c;
  if (a>b) and (c>b) then
    k:=b;
  if (c>a) and (b>a) then
    k:=a;
  for i:=1 to k do
  begin
    if (c mod i = 0) and (b mod i = 0) and (a mod i = 0) then
      write (i, ' ');
  end;
  readln;
end.
 